﻿namespace Homework05
{/// <summary>
/// 输入一个十进制输出其二进制形式
/// </summary>
    internal class Homework05
    {
        static void Main(string[] args)
        {
            Console.Write("输入一个十进制，为你输出他的二进制");
            int num = 15;
            string bin = "";
            do
            {
                bin = num % 2 + bin;
                num = num / 2;
            } while (num > 0);
            Console.WriteLine(bin);



        }
    }
}
